package com.movie.service.Impl;

import com.movie.beans.SysUserRole;
import com.movie.dao.SysUserRoleDAO;
import com.movie.service.SysUserRoleService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Description : 用户角色关联业务
 * @Author : nlw
 * @Date : 2021/8/27
 */
@Service
public class SysUserRoleServiceImpl implements SysUserRoleService {
    @Resource
    private SysUserRoleDAO userRoleDAO;

    @Override
    public Long selectRoleByUserId(Long userId) {
        return userRoleDAO.selectRoleByUserId(userId);
    }

    @Override
    public List<Long> selectUserByRoleId(Long roleId) {
        return userRoleDAO.selectUserByRoleId(roleId);
    }

    @Override
    public int insert(SysUserRole userRole) {
        return userRoleDAO.insert(userRole);
    }
}
